#!/usr/bin/python2.5

import cgitb; cgitb.enable()
import sys
import web


urls = ("/.*", "hello")
app = web.application(urls, globals())

class hello:
	def __init__(self):
		web.header('Content-Type', 'text/html') 
	def GET(self):
		return 'Hello, world!'

if __name__ == "__main__":
	app.run()


def cgidebugerror():
	_wrappedstdout = sys.stdout

	sys.stdout = web._oldstdout
	cgitb.handler()

	sys.stdout = _wrappedstdout

web.internalerror = cgidebugerror
